home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sph_dos.lha / dos / sphdemo.v08 / README < prev    next >
Encoding:
Text File  |  1991-11-26  |  3.4 KB  |  85 lines

  1. We provide the source code (3 .c files and 3 .h files) for a demo program.
  2.  
  3. You need to edit the source code before you compile.  In the main.c, find this
  4. line:
  5.        SPH_begin (500,400, numplanes, numshades);
  6.  
  7. Change the first two numbers so they represent the size of (number of pixels
  8. across and down) your screen. 
  9.  
  10. Also look for this line in main.c:
  11.                      READ_FROM_STDIN = TRUE; 
  12.  
  13. You may need to change TRUE to FALSE to get things to work on your system.
  14.  
  15.  
  16.  
  17. This program is an interactive model-viewing system.  A model of a neighborhood
  18. of houses is created and the camera is initialized.  You can change the
  19. camera's position, orientation, and parameters by using keystrokes.  The user
  20. interface is poor, but it is a satisfactory method for getting acquainted with
  21. the SPHIGS camera model.
  22.  
  23. Two images of the model are visible on the screen.  In the larger viewport is a
  24. solid, shaded image that is the (currently) highest-quality image SPHIGS can
  25. produce.  In the smaller viewports are wireframe-raw images produced using
  26. ORTHOGRAPHIC projection; they also show the view volume and the location of the
  27. PRP and VRP.
  28.  
  29. The numeric keys allow you to choose which part of the camera you wish to
  30. modify.  Each time you hit one of these keys, a prompt is sent to the screen to
  31. remind you which camera part you are currently manipulating.
  32.  
  33.     1    change the VRP along the UVN axes 
  34.            (to move the camera relative to current orientation)
  35.     2    change the VRP along the XYZ axes
  36.            (to move the camera relative to World Coordinate system)
  37.     3    change the VPN (to rotate the camera)
  38.     4    change the PRP (to change the focal length)
  39.     5    change the front clipping-plane distance
  40.     6    change the back clipping-plane distance
  41.  
  42.     0     restore the camera to default location, orientation, etc.
  43.  
  44. You manipulate the "camera part" that you have selected, on three axes:
  45.     X (or U)
  46.     Y (or V)
  47.     Z (or N)
  48.  
  49. To manipulate on the X axis, you use "s" for left and "d" for right.
  50.     "s" subtracts            "d" adds
  51.  
  52. To manipulate on the Y axis, you use "e" for up and "x" for down.
  53.     "x" subtracts             "e" adds 
  54.  
  55. To manipulate on the Z axis, you use "+" to move away from the model (towards
  56. positive infinity) and "-" to move into the model.  (The model's vertices all
  57. have negative Z coords.)
  58.     "-" subtracts             "=" adds 
  59.  
  60. Each time you hit one of the above six keys, the camera is moved by STEPSIZE
  61. units or rotated by STEPSIZE degrees.  The default step size is 30
  62. units/degrees, but you can manipulate the step size using the "<" (to decrease
  63. it by 5) and ">" (to increase it by 5) keys.  The current step size is
  64. echoed to the console whenever it is changed.
  65.  
  66. You can restore the camera's attributes to their default values (as they are
  67. when the program starts up) by hitting '0'.  This is a great way to recover if
  68. you've gotten "lost".
  69.  
  70. You can add a chimney to each house by entering a capital "C", and remove it by
  71. entering a lowercase "c".
  72.  
  73. You can eliminate the wireframe orthographic views (and blow up the nicely
  74. renderered view to full window size) by hitting lowercase 'a', and restore all
  75. the views by hitting capital 'A'.
  76.  
  77. You can toggle the larger view between its default lit-flat rendering and
  78. the alternative "high-quality wireframe" by hitting:
  79.     "n"            to set rendering to lit-flat
  80.     "m"            to set rendering to wireframe
  81.  
  82. Input pick correlation is demonstrated by simply clicking the mouse button
  83. anywhere within the main (perspective) viewport.  If you click on any part of a
  84. house, you will see a message reporting which house you picked.
  85.